package com.dingwen.treasure.business.feign;

import com.dingwen.treasure.base.constant.ServerConstant;
import com.dingwen.treasure.base.pojo.vo.Result;
import com.dingwen.treasure.business.feign.fallback.TreasureTaskFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * open feign 调用: business --> task
 *
 * @author dingwen
 * @date 2022/03/31
 */
@FeignClient(name = ServerConstant.TREASURE_TASK_QUARTZ,fallbackFactory = TreasureTaskFeignClientFallback.class)
public interface TreasureTaskFeignClient {
    /**
     * business调用task测试
     *
     * @param id id
     * @return {@link Result}
     */
    @GetMapping("feign")
    Result<Long> test(@RequestParam Long id);



}
